<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="root">
    <h2>{{name}}</h2>
    <h2>{{hobby[0]}}</h2>
  </div>
  <script src="../js/vue.js"></script>
  <script>
    const obj = {
      name: '张三',
      age: 18,
      hobby: ['篮球', '排球', '棒球']
    }
    const app = new Vue({
      el: '#root',
      data: obj,
      method:{
        add : function(){
          //后面会使用ES6的写法
        }
      }
    })
  </script>
</body>

</html>